﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OgilvyOne.BLL;
using System.Data;
using System.Configuration;

public partial class allergy_doctor_doctor_FAQ : System.Web.UI.Page
{
    protected string DomainName;
    public string type;
    protected void Page_Load(object sender, EventArgs e)
    {
        DomainName = ConfigurationSettings.AppSettings["DomainName"];
        
        //string id = Request.Params["id"].ToString();
        string id = Request.Params["id"];
        DataTable dt = BLLArticleInfo.getFAQ(id);
        foreach (DataRow row in dt.Rows)
        {
            string lx = row["type"].ToString();
            if(lx=="1")
            {
                type = "母乳喂养";
            }
            if (lx == "2")
            {
                type = "过敏预防";
            }
            if (lx == "3")
            {
                type = "适度水解配方";
            }
            if (lx == "4")
            {
                type = "过敏风险测试";
            }

        }

        this.content_rpt.DataSource = dt;
        this.content_rpt.DataBind();

        //更多在线问答
        this.more_rpt.DataSource = BLLArticleInfo.getMoreFAQ();
        this.more_rpt.DataBind();

        //最新问答推荐
        this.recommend_rpt.DataSource = BLLArticleInfo.getRecommendFAQ();
        this.recommend_rpt.DataBind();
        
        //专家博客
        this.right_rpt.DataSource = BLLArticleInfo.getFaqBlog();
        this.right_rpt.DataBind();

    }
}
